package com.zkingsoft.zkingbase.manager;

import android.content.Context;
import android.os.Handler;

import cn.jpush.android.api.JPushInterface;
import cn.jpush.android.api.TagAliasCallback;

/**
 * Created by ytf on 2016/12/20.
 */
public class JPushManager
{
    private static JPushManager instance;

    private JPushManager(){}

    public static JPushManager getInstance()
    {
        if (instance == null)
        {
            synchronized (JPushManager.class)
            {
                //现在没有被锁住，所以还要判断一次
                if(instance == null)
                {
                    instance = new JPushManager();
                }
            }
        }
        return instance;
    }

    private Handler mHandler;

    public void setAlias(String alias, Context context, TagAliasCallback callback)
    {
        JPushInterface.setAliasAndTags(context, alias, null, callback);
    }
}
